package com.weitu.emergency.controller;

import com.weitu.base.controller.BaseController;
import com.weitu.emergency.entity.StoragePoint;
import com.weitu.emergency.entity.TeamAndRegion;
import com.weitu.emergency.service.TeamAndRegionService;
import com.weitu.paging.DataGridPagination;
import com.weitu.plugin.PageView;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author zhangqingxi 2017/5/23
 */
@Controller
@RequestMapping("emergency/teamAndRegion")
public class TeamAndRegionController extends BaseController {

    private final TeamAndRegionService teamAndRegionService;

    @Autowired
    public TeamAndRegionController(TeamAndRegionService teamAndRegionService) {
        this.teamAndRegionService = teamAndRegionService;
    }

    @ResponseBody
    @RequestMapping("/findByTeamId")
    public List<TeamAndRegion> findByTeamId(String emergencyTeamId) {
        return teamAndRegionService.findByTeamId(emergencyTeamId);//获取总数

    }

}
